Repository navigation
[Security] Enforce direct-report access boundaries - #70
Draft
patrickschiller wants to merge 2 commits into
Draft
patrickschiller wants to merge 2 commits into
patrickschiller wants to merge 2 commits into
Conversation
Signed-off-by: Patrick Schiller <p@trickschiller.de>
Signed-off-by: Patrick Schiller <p@trickschiller.de>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n\n- Restrict manager time-entry access to direct reports.\n- Require authentication and explicit roles for project and work-schedule reads.\n- Preserve Solo ownership rules while closing Team-mode read exposure.\n\n## Linked issue\n\nNone. Implements findings from Codex Security scan 38b23c4d-51a7-4e1e-b83f-33007bd0f77b.\n\n## Changes\n\n- Recheck direct-manager authorization inside time-entry write transactions.\n- Limit bookable-project reads to self, direct reports, or HR administrators.\n- Require Manager or HRAdmin for project reads and HRAdmin for work schedules.\n- Regenerate the OpenAPI security metadata.\n- Add focused Team and Solo regression coverage.\n\n## How was this tested?\n\n- Nx API and api-e2e typechecks passed.\n- Nx API and api-e2e lint passed with only existing warnings.\n- Five focused E2E suites passed: 59 tests.\n- Nx format check and git diff check passed.\n\n## Release notes\n\n- Security: Restrict manager and configuration reads to authorized employee scopes.\n\n## Upgrade impact\n\n- Database migration: None.\n- Breaking change: No; previously unauthorized access now returns 401 or 403.\n- Manual operator action: None.\n\n## Checklist\n\n- [x] All commits are signed off with git commit -s.\n- [x] Lint, typecheck, and relevant tests pass locally.\n- [x] New behaviour is covered by tests where appropriate.\n- [x] Release notes and upgrade impact are documented above.\n- [x] Existing Prisma migrations were not edited.\n- [x] No domain rules from base-instructions.md were changed.\n- [x] No new third-party dependencies were added.